//
//  TestViewController.m
//  WQTransitionAnimationTool
//
//  Created by Xiang on 2021/5/12.
//

#import "TestViewController.h"

@interface TestViewController ()

@end

@implementation TestViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"TestViewController";
    self.view.backgroundColor = UIColor.yellowColor;
    

    UIButton *btn = [[UIButton alloc]init];
    btn.frame = CGRectMake(0, 0, 50, 30);
    [btn setTitle:@"返回" forState:UIControlStateNormal];
    btn.backgroundColor = UIColor.redColor;
    [btn addTarget:self action:@selector(backBtnClick) forControlEvents:UIControlEventTouchUpInside];
    UIBarButtonItem *backItem = [[UIBarButtonItem alloc]initWithCustomView:btn];
    self.navigationItem.leftBarButtonItem = backItem;
    
    
}

- (void)backBtnClick{
    [self dismissViewControllerAnimated:YES completion:^{
    }];
}

@end
